<!DOCTYPE html>
<html>
<head>
<title>点击按钮弹出计算结果</title>

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

<script type="text/javascript">
	function sum() {
		var a = 10;
		var b = 21;
		document.getElementById("pid1").innerHTML = a + b;
	}
</script>

</head>

<body>
	<p>a+b=?</p>
	<button onclick="sum()">计算结果</button>
	<p id="pid1">结果</p>

</body>
</html>
